package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_GFS_IMG"
 *     
*/
public class CcpGfsImg implements Serializable {

    /** identifier field */
    private String cgiGuid;

    /** nullable persistent field */
    private String cgfGuid;

    /** nullable persistent field */
    private byte[] cgiImg;

    /** nullable persistent field */
    private String reserved1;

    /** nullable persistent field */
    private String reserved2;

    /** nullable persistent field */
    private String reserved3;

    /** full constructor */
    public CcpGfsImg(String cgiGuid, String cgfGuid, byte[] cgiImg, String reserved1, String reserved2, String reserved3) {
        this.cgiGuid = cgiGuid;
        this.cgfGuid = cgfGuid;
        this.cgiImg = cgiImg;
        this.reserved1 = reserved1;
        this.reserved2 = reserved2;
        this.reserved3 = reserved3;
    }

    /** default constructor */
    public CcpGfsImg() {
    }

    /** minimal constructor */
    public CcpGfsImg(String cgiGuid) {
        this.cgiGuid = cgiGuid;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="CGI_GUID"
     *         
     */
    public String getCgiGuid() {
        return this.cgiGuid;
    }

    public void setCgiGuid(String cgiGuid) {
        this.cgiGuid = cgiGuid;
    }

    /** 
     *            @hibernate.property
     *             column="CGF_GUID"
     *             length="32"
     *         
     */
    public String getCgfGuid() {
        return this.cgfGuid;
    }

    public void setCgfGuid(String cgfGuid) {
        this.cgfGuid = cgfGuid;
    }

    /** 
     *            @hibernate.property
     *             column="CGI_IMG"
     *             length="2147483647"
     *         
     */
    public byte[] getCgiImg() {
        return this.cgiImg;
    }

    public void setCgiImg(byte[] cgiImg) {
        this.cgiImg = cgiImg;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED1"
     *             length="50"
     *         
     */
    public String getReserved1() {
        return this.reserved1;
    }

    public void setReserved1(String reserved1) {
        this.reserved1 = reserved1;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED2"
     *             length="50"
     *         
     */
    public String getReserved2() {
        return this.reserved2;
    }

    public void setReserved2(String reserved2) {
        this.reserved2 = reserved2;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED3"
     *             length="50"
     *         
     */
    public String getReserved3() {
        return this.reserved3;
    }

    public void setReserved3(String reserved3) {
        this.reserved3 = reserved3;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("cgiGuid", getCgiGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpGfsImg) ) return false;
        CcpGfsImg castOther = (CcpGfsImg) other;
        return new EqualsBuilder()
            .append(this.getCgiGuid(), castOther.getCgiGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getCgiGuid())
            .toHashCode();
    }

}
